﻿SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[GPSPoint]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[GPSPoint](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[EntityName] [nvarchar](50) NOT NULL,
	[GameName] [nvarchar](50) NULL,
	[Login] [nvarchar](50) NULL,
	[Latitude] [float] NOT NULL,
	[Longitude] [float] NOT NULL,
	[Time] [datetime] NOT NULL CONSTRAINT [DF_GPSPoint_Time]  DEFAULT (getdate()),
	[Speed] [float] NULL,
	[Altitude] [float] NULL,
	[EntityID] [int] NULL,
	[GameID] [int] NULL,
	[UserID] [int] NULL
CONSTRAINT [PK_GPSPoint] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
 